home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / gtld3656.lha / GadUtil / Docs / AutoDocs / 17.GU_OpenCatalog < prev    next >
Text File  |  1995-06-18  |  2KB  |  65 lines

  1. gadutil.library/GU_OpenCatalog                 gadutil.library/GU_OpenCatalog
  2.  
  3.    NAME
  4.     GU_OpenCatalog -- Open a message catalog.
  5.  
  6.    SYNOPSIS
  7.     catalog = GU_OpenCatalog(name, version)
  8.     D0                       A0    D0
  9.  
  10.     struct Catalog *GU_OpenCatalog(STRPTR, ULONG);
  11.  
  12.    FUNCTION
  13.     This function opens a message catalog. Catalogs contain all the
  14.     text strings that an application uses. These strings can easily
  15.     be replaced by strings in a different language, which causes the
  16.     application to magically start operation in that new language.
  17.  
  18.     Catalogs originally come from disk files. This function searches
  19.     for them in the following places:
  20.  
  21.         PROGDIR:Catalogs/languageName/name
  22.         LOCALE:Catalogs/languageName/name
  23.  
  24.     where languageName is the name of the language associated with the
  25.     locale parameter.
  26.  
  27.    INPUTS
  28.     catalogname - the NULL terminated name of the catalog to open (just
  29.               the name, not the complete path to it).
  30.  
  31.     version - required version of the catalog to open. Passign 0 as version
  32.           number means that the program will accept any found version of
  33.           the catalog. Other values than 0 means exactly that version.
  34.  
  35.    RESULT
  36.     catalog - A message catalog to use with GU_GetLocaleStr or any of the
  37.           Locale library functions or NULL. NULL is returned on error
  38.           or if the application can use its built-in strings instead
  39.           of loading a catalog from disk.
  40.  
  41.    EXAMPLE
  42.     GU_OpenCatalog("myprogram.catalog",0);
  43.  
  44.     will open any version of the catalog file "myprogram.catalog" found
  45.     in either PROGDIR:Catalogs/languageName/ (where the program was started
  46.     from), or LOCALE:Catalogs/languageName/.
  47.  
  48.     GU_OpenCatalog("myprogram.catalog",5);
  49.  
  50.     will open version 5 of the catalog file. If v5 is not available, the
  51.     program will use its internal strings.
  52.  
  53.    NOTES
  54.     If you want to specify other tags than the version tag, you must
  55.     use the Locale library OpenCatalog(). This function is generally a
  56.     shortcut to that function. By using this routine, you may not need
  57.     to open Locale library at all.
  58.  
  59.     This routine assumes that the built-in language of the program is
  60.     english. If you write your programs in another language, you must
  61.     open the catalog by yourself.
  62.  
  63.    SEE ALSO
  64.     GU_CloseCatalog(), locale/OpenCatalog()
  65.